//   内容管理
import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/information/sysnews/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/information/sysnews',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/information/sysnews/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/information/sysnews/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/information/sysnews',
    method: 'put',
    data: obj
  })
}
// 启用禁用
export function enable(obj) {
  return request({
    url: '/information/sysnews/enable/' + obj.id,
    method: 'get',
    params: {}
  })
}
